home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The 640 MEG Shareware Studio 2
/
The 640 Meg Shareware Studio CD-ROM Volume II (Data Express)(1993).ISO
/
utility
/
fcbin12.zip
/
FCBIN.DOC
next >
Wrap
Text File
|
1992-09-25
|
21KB
|
521 lines
FCBIN Ver. 1.2
Copyright (c) 1990-1992 Mike Albert
September 1992
1 INTRODUCTION
FCBIN compares two files and lists the differences between them byte by
byte. FCBIN provides the following benefits:
o FCBIN shows PER BYTE differences between files. Line endings
are treated just like other characters.
o Any type of file - ASCII, executable, data base, etc. - can be
compared.
o FCBIN never gets confused or "unsynchronized" (as some
comparison programs can).
o FCBIN always finds the smallest set of differences between
files, and never misses matching bytes.
o FCBIN lets you do multiple comparisons in one run.
o FCBIN can be customized to use your favorite options
automatically.
If you're familiar with earlier versions of FCBIN, look at section 7 to
learn about the enhancements.
FCBIN can be used on any IBM-compatible computer. Any display adapter
that provides 80 character lines, including those with more than 25
lines per screen, will work correctly. FCBIN runs under MS-DOS versions
2.0 and later, but 3.0 or later is required to customize the default
options. The amount of memory required is dependent on file size. 100K
is enough for small files, while up to 425K is needed for large ones.
Files containing up to 32,700 bytes can be compared.
2 OPERATION
To list the differences between two files byte by byte:
fcbin file1 file2 options
Changes to file1 to make file2 are listed. Wild-card characters can be
used to do multiple comparisons. The options are:
-a list all bytes (whether different or the same)
-s list only bytes that are the same
-c<n> show context for changes - list up to <n> unchanged
bytes as changed when that's clearer - default <n> is 1
-x show extended ASCII characters
-u update default options, -u- clears old defaults first
>file3 put difference listing in file file3
A default option can be turned off with a minus sign, e.g. -x- turns off
the -x option. You can also make an option affect only screen output or
file output - an "s" after the option letter indicates screen output,
while "f" indicates file output. E.g. -cs5 specifies that the -c5
- 1 -
option is used for screen output, but doesn't affect output to a file.
This feature is useful when updating default options (with the -u
option), because you often want different options for the two output
devices.
The following examples illustrate the use of FCBIN:
Compare two files in the current directory and display the
differences on the screen:
fcbin db1.asc db2.asc
Compare two files in different directories and drives, list all
bytes, and put the difference listing in file db2.dif:
fcbin d:\backup\db1.asc c:\tc\db2.asc -a >db2.dif
Compare two files with the same names in different directories and
drives and display the differences:
fcbin d:\backup\db1.asc c:\tc
Compare all files with ".c" extensions and the same names in two
different directories:
fcbin \backup\*.c \tc\*.*
Change the default options for future invocations of FCBIN to -x for
output to either output device, and -c5 for output to the screen:
fcbin -u- -x -cs5
Turn off the -x default option (which was previously set) for output
to a file, but leave it on for screen output:
fcbin -u -xf-
3 DETAILED OPERATION
The arguments to FCBIN (files and options) can be supplied in any order.
The options work as follows:
-a All - FCBIN normally lists only the bytes that differ
between the two files. With the -a option, matching bytes
are also listed.
-s Same - With the -s option, only matching bytes are listed.
-c<n> Context - When this option is used, FCBIN shows context
surrounding changes to make the listing more readable. This
is done by listing unchanged bytes as changed when they are
between changed bytes. Use this option when you want to
make the listing easier to understand, and don't care if a
few unchanged bytes are listed as changed. The value <n>
indicates how many unchanged bytes can be listed as changed.
The default value of <n> is 1.
-x Extended ASCII - FCBIN normally displays only printable
ASCII characters, i.e. those with values from hex 20 through
- 2 -
7E, in the character portion of the listing. With the -x
option, all characters (except some control characters) are
displayed. The hexadecimal portion of the listing always
shows all characters.
-u Update - This feature updates the default options. You can
use this option to make your favorite options the default,
so you don't have to enter them every time you use FCBIN.
When you use the -u option, the current options (i.e. the
current defaults plus options specified on the command line)
become the default. The -u- option is like -u, except that
the current defaults are ignored - only the options shown on
the command line become the new defaults. FCBIN can't
update the options and compare files in the same run, so
don't specify file names when you use the -u or -u- option.
This feature works by changing the program (i.e. fcbin.exe)
file. If you want, you can make multiple FCBIN's with
different default options by simply copying the fcbin.exe
file with a new name (e.g. fcall.exe) and using the -u
option to set the default values of the copy. This feature
only works with MS-DOS version 3.0 or later.
>file FCBIN normally displays the difference listing on the
or screen. This option directs the listing to the file you
>>file specify - just enter the file name after the ">". If the
file already exists, it is overwritten. The ">>" option can
be used in the same way to append the listing to the end of
a file, instead of overwriting it.
The file names specify a drive and directory in the normal MS-DOS
manner. If no drive is specified, FCBIN looks for files on the current
drive. If no directory is specified, FCBIN looks in the current
directory. The standard MS-DOS wild-card characters may be used to
compare multiple files. When FCBIN finds wild-card characters in the
first file name, it performs a compare for each matching file. A wild-
card character in the second name means use the name (or extension) of
the first file. If the second file is not found FCBIN indicates it is
missing, and continues with other files that match the first name. If
you specify a directory or drive (without a file name and extension) for
either the first or second name, FCBIN acts as though you specified a
file and extension of "*.*". The following examples illustrate these
principles:
Compare all files with ".c" extensions and the same names in two
different directories:
fcbin \backup\*.c \tc
Compare files fcupdate.c1 and fcupdate.c2:
fcbin fcupdate.c1 *.c2
Compare all files in the current directory with ".c1" extensions
with files that have the same names and ".c2" extensions in the same
directory:
fcbin *.c1 *.c2
- 3 -
Compare all files in current directory with files that have the same
names on the diskette in drive b:
fcbin . b:
Compare all files with names starting with "a" and having a ".c"
extension with files that have the same names in the directory
"work" that is a subdirectory of the parent directory of the current
directory:
fcbin \backup\a*.c ..\work
If you display the difference listing on the screen, you can control the
scrolling. When FCBIN is scrolling, pressing any key makes it pause.
When it pauses, you can use the following keys:
Enter Show another screen full
space Show one more line
s Scroll continuously
ESC Exit the program
You can also use the Ctrl-S and Ctrl-Q keys (the ASCII terminal
convention) to regulate scrolling if you prefer.
4 FCBIN MESSAGES
Error: argument -<x> is invalid
FCBIN couldn't recognize the argument you specified on the
command line (argument <x>). Check the list of arguments that
FCBIN accepts to determine what options you can use. You can
list the options FCBIN recognizes by typing "fcbin ?".
Error: the -<x> option value <v> is wrong
FCBIN couldn't recognize the value <v> specified with the <x>
option on the command line. Most options accept one or two
decimal digits, e.g. -c4. An example of a value specified for
screen display only is -cs5. Check the list of options that
FCBIN accepts to determine what values you can use. You can
list the options and values FCBIN recognizes by typing "fcbin
?".
Error: option -<x> doesn't accept a value
FCBIN found a value specified for option <x>, but that option
doesn't accept a value. You can list the options FCBIN
recognizes by typing "fcbin ?".
Error: both -<x> and -<y> options specified together
FCBIN found two incompatible options (<x> and <y>) specified on
the command line. You can only use one at a time.
Warning: -<x> default option ignored because -<y> option specified
FCBIN found an option (argument <x>) on the command line that
conflicts with default option <y>. FCBIN ignored the default
option.
- 4 -
Warning: -<x> option ignored because it conflicts with -<y> default
option
FCBIN found an option (argument <x>) on the command line that
conflicts with default option <y>. FCBIN ignored the option on
the command line.
Error: <n> is too small a value for option -<x> - the lower limit
is <m>
FCBIN found a value (<n>) specified for option <x> that is too
small. You must specify a value greater than or equal to <m>.
Error: <n> is too large a value for option -<x> - the limit is <m>
FCBIN found a value (<n>) specified for option <x> that is too
large. You must specify a value less than or equal to <m>.
Error: more than two file names specified
Error: fewer than two file names specified
FCBIN didn't find the names of two files to compare on the
command line. If you forgot to specify the minus sign ("-") in
front of an option, FCBIN interpreted it as a file name. You
must specify two file names.
Error: file <f> wasn't found
FCBIN couldn't find file <f>. If you didn't specify a directory
or drive, FCBIN looked in the current directory and drive. Make
sure you specify the correct file name, with the directory and
drive if needed, on the command line.
Error: no files found at <f>
FCBIN couldn't find any files in directory or drive <f>. Make
sure you specify the correct drive and directory on the command
line.
Error: no files match <f>
FCBIN couldn't find any files that matched file name <f>, which
contains wild-card characters. Make sure you specify the
correct file name on the command line.
Error: more than 32,700 bytes in file <f>
File <f> contains more than 32,700 bytes. FCBIN can only
process files containing up to 32,700 bytes. Your only option
is to break your files into smaller files.
Error: not enough memory to process these files
FCBIN needs more memory to process these files than is
available. FCBIN will continue by comparing the remaining files
if you specified multiple comparisons, otherwise it will
terminate. The only way to correct this problem is to run on a
machine with more memory, remove any memory-resident programs,
or to split the file into smaller files. This problem only
occurs when comparing large files on machines with small memory
configurations.
Error: output failed, disk probably full
FCBIN detected an error when writing a file. This only occurs
when the difference listing is directed to a file with the ">"
or ">>" options. The most likely cause of this error is a full
disk.
- 5 -
Error: file names can't be used with the -u option
FCBIN found file names specified on the command line with the -u
or -u- option. You can't update default options and compare
files at the same time.
Error: couldn't update default options
FCBIN couldn't write to the program (i.e. fcbin.exe) file to
update the default options. This happens when the fcbin.exe
file is on a write-protected floppy disk, the file has been
given the read-only attribute, you're using an MS-DOS version
less than 3.0, or the file is on a network server and you don't
have write privileges for the file.
5 LICENSING, WARRANTY, and REGISTRATION
FCBIN is distributed as shareware. I encourage you to try FCBIN and
share it with friends as long as:
The FCBIN program and this documentation file are not modified and
are distributed together.
FCBIN is not provided as a part of any other product.
No fees, beyond a reasonable fee for media, duplication, or
downloading costs, are charged.
FCBIN is not used for commercial, government, or business purposes
without registration. Each registration is for a single person or a
single computer.
If you find FCBIN useful and decide to use it regularly, you are
required to register. All registration payments will be donated to
Oxfam America, an international development and disaster relief agency.
It's a worthy charity that I've been supporting for many years. For
more information on Oxfam see section 6.
When you register you get the satisfaction of saving lives in Africa,
Asia, and South America, and encourage me to produce more software at
reasonable prices. You also get the following benefits:
I'll notify you of new FCBIN versions when they become available.
I'll send an updated version of FCBIN to you at no additional cost.
You can request this at any time. I'll do this once per registered
user.
I'll answer questions on FCBIN and its use. You can contact me at
the address shown below or via CompuServe mail.
If any important bugs are found I will notify you.
I'll make an attempt (but can't guarantee) to fix any problems you
find.
Registration is $25. Please make your check payable to Oxfam America -
I'll send your checks to Oxfam and record your registration information.
I'll also accept original canceled checks or receipts from Oxfam that
- 6 -
list you as the donor. Please send payments, registration information,
and any other correspondence to:
Mike Albert
P. O. Box 535
Bedford, MA 01730
I can also be reached via CompuServe mail; my userid is [70325,1134].
Anyone can order the latest version of FCBIN directly from me for a fee
of $5.00. Just send the order (make sure it contains your mailing
address) with your check to the above address. You'll receive a 5 1/4
inch 360Kb floppy disk containing the executable and documentation
files. If you need other formats (5 1/4 inch 1.2Mb or 3 1/2 inch 720Kb
or 1.44Mb) I can provide them. I'll also include other shareware
products I produce. If you live outside North America, please send
extra money for the increased postage.
I welcome all comments and suggestions concerning FCBIN. I'd like to
know how you are using FCBIN, where you obtained it, and what problems,
bugs, or weaknesses you find. If you tell me about enhancements or
changes you're interested in, I'll make an effort to provide them.
This program is provided "as is" without warranty of any kind, either
express or implied, but not limited to the implied warranties of
merchantability or fitness for a particular purpose. The entire risk as
to the results and performance of the program is assumed by the user.
Should the program prove defective, the user assumes the entire cost of
all necessary servicing, repair, or correction.
6 OXFAM AMERICA
As stated in Oxfam literature,
"Oxfam America is an international agency that funds self-help
development projects and disaster relief in poor countries in
Africa, Asia, and Latin America, and also prepares and distributes
educational materials for people in the United States on the issues
of development and hunger. The name "Oxfam" comes from the Oxford
Committee for Famine Relief, founded in England in 1942. Oxfam
America, based in Boston, was formed in 1970, and is one of seven
autonomous Oxfams around the world (Great Britain, Australia,
Belgium, Canada, Quebec, Hong Kong and the United States). Oxfam is
a nonsectarian, nonprofit agency that neither seeks or accepts U.S.
government funds. All contributions are tax-deductible to the
extent permitted by law."
For more information, you can phone Oxfam at 617-482-1211, or write to
them at:
Oxfam America
26 West Street
Boston, MA 02111-1206
- 7 -
7 FCBIN REVISION HISTORY
FCBIN version 1.2 - 9/25/92
Fixed occasional malfunction in -c option processing.
Improved display format.
Updated documentation to show new mailing address and CompuServe
contact information.
FCBIN version 1.1 - 6/11/91
Fixed problem processing directories with extensions.
Improved warning messages and error checking.
Ensured that spurious keystrokes are ignored during screen
display.
Added support of output to screens with more than 25 lines.
FCBIN version 1.0 - 8/30/90
Initial release of FCBIN program.
- 8 -